<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>ECSHOP 管理中心</title>
<base href="__ROOT__/admin/" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href="styles/general.css" rel="stylesheet" type="text/css">
<link href="styles/main.css" rel="stylesheet" type="text/css">

<style type="text/css">
/*body,html {height: 100%; overflow: hidden;}*/
* {box-sizing: content-box;}
.panel-icloud .panel-right iframe {height: 300px; margin-top: 15px;}
.panel-hint{top: 3%;}
.login-body{ background: url('images/background.jpg') no-repeat   center left ; }

.center-wrap .z-bd{
  width: 582px;
}
.z-bd .login-panel{
  padding: 5px 20px 25px;
}
.login-cloud{
  padding:70px 10px 20px;
}
.center-wrap{
  width: 94%;
}
.center-wrap .z-bd{
  background-size: contain;
  height:391px;
}
</style>


</head>
<body style="height: 100%;padding: 0">
<div class="form-header">
  <div class="logo"></div>
</div>
<div class="login-body" > 
  <!--<div class="login-hd">
    <img src="images/shopex.png" alt="shopex" class="logo">
  </div>-->
  <div class="center-wrap" id="centerWrap">
    <!--<div class="login-center">
      <div class="bd-logo">
        <img src="images/ecshop-logo.png" width="373" height="103" border="0" alt="ECSHOP" />
      </div>
    </div>-->
    <div class="top-ibg-wrap">
      <a href="http://ecstore.shopex.cn/?from=ecshoplogin" target="_blank" class="top-ibg-480600"></a>
    </div>
    <div class="z-bd">
    <div class="message"></div>
      <div class="login-panel" id="loginPanel" style="background:#e6dac0">
       <h3 class="logo-text ecshop-logo">
         <div class="logo"> E C S H O P 登 录</div>
       </h3>
        <div class="controls first">
          <input  placeholder="请填写用户名" type="text" id="username">
        </div>
        <div class="controls two active">
         
          <input placeholder="请输入密码" type="password" id="password">
        </div>
                  <div class="controls third active">
           
            <input class="capital" placeholder="输入验证码" type="text" id="capital">
 
            <div class="" style="position: absolute; right: 8px; top: 8px;" id="number_div">
               <img  id="yzm" src="__ROOT__/admin/lib/code.php" style="cursor: pointer;" title="看不清？点击更换另一个验证码。" width="102" height="34" border="1" onclick="this.src='http://www.jodieme.cn/admin/lib/code.php' ">
            </div>
          </div>
                <div class="controls last">
          <button class="btn-a" id="sub">登 录</button>
         
          <span style="display: none" id="login_error_msg"></span>
        </div>
        <div class="controls bside" style="border: none">
          <input value="1" name="remember" id="remember" type="checkbox">
          <label for="remember">自动登录</label>
          <a class="link-forget cl-link-blue" href="http://localhost/dayi/ecshop/ecshop/admin/get_password.php?act=forget_pwd">忘记密码?</a>
          <a class="link-home cl-link-blue" href="http://localhost/dayi/ecshop/ecshop/">去店铺首页&gt;&gt;</a>
        </div>          
      </div>
      <div class="login-cloud" id="elseLogin" style="display:none" >
        <div class="hd">其他登录方式</div>
        <!--<a id="cloudLogin" href="privilege.php?act=login&type=yunqi" target="_parent">-->
        <span class="btn-tab" id="cloudLogin" href="javascript:void(0)" target="_parent">
        </span>
        <p>第三方登录</p>
      </div>
    </div>
  </div>
 
</div>
<div class="copy-right">© 2003-2018 ShopEx,Inc.All rights reserved.</div>

</body></html>
<script src="__ROOT__/admin/js/jquery-2.1.4.min.js"></script>
<script>


  $(document).on('click','#sub',function(){   
      var username=$("#username").val();
      var password=$("#password").val();
      var capital=$("#capital").val();
      if(username==''){
            alert('用户名不能为空');return false;
      }
      if(password==''){
            alert('密码不能为空');return false;
      }
      if(capital==''){
            alert('验证码不能为空');return false;
      }  
      $.ajax({

          url:"{:url('login/index')}",
          type:"post",
          data:{username:username,password:password,capital:capital},
          dataType:"json",
          success:function(res){
              if(res=='0'){
                alert('登录失败,请检查你用户名与密码');
              }else if(res=='2'){
                alert('验证码不能输入错误');
              }else{
                alert('登录成功，欢迎登录');
                location.href="http://www.jodieme.cn/index.php/admin/index/index";
              }
          }
      }) 
  })

</script>